
function msgs.RIHI( msg )

	local id = msg:ReadShort();
	local name = msg:ReadString();
	
	local ent = ents.GetByIndex( id );
	
	ent:GetTable().ItemName = name;

end

function msgs.PCT( msg )

	local id = msg:ReadShort();
	local ent = ents.GetByIndex( id );

	if( ent and ent:IsValid() ) then

		ent:GetTable().ChangedTitleInfo = true;

	end
	
end


function msgs.RPHI( msg )

	local id = msg:ReadShort();
	local title = msg:ReadString();
	
	local ent = ents.GetByIndex( id );
	
	ent:GetTable().Title = FormatLine( title, "PlayerDisp", 300 );

	if( TargetEnts[id] ) then
	
		TargetEnts[id] = nil;
	
	end
	
	for k, v in pairs( TargetDisplays ) do
	
		if( v.EntIndex == id ) then
		
			TargetDisplays[k] = nil;
		
		end
	
	end

end

function msgs.D( msg )

	local type = msg:ReadShort();
	
	if( type == 1 ) then
	
		DeathMessage = string.gsub( "You have died by your own hands.", " ", "   " );
	
	elseif( type == 2 ) then
	
		DeathMessage = string.gsub( "You have been killed.", " ", "   " );
	
	elseif( type == 3 ) then
	
		DeathMessage = string.gsub( "You were shot in the head.", " ", "   " );
	
	elseif( type == 4 ) then
	
		DeathMessage = string.gsub( "You have bled to death.", " ", "   " );
	
	elseif( type == 5 ) then
	
		DeathMessage = string.gsub( "You have been mauled to death.", " ", "   " );
	
	elseif( type == 6 ) then
	
		DeathMessage = string.gsub( "You have been beaten to death.", " ", "   " );
	
	end

end
